package com.sl.au.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.sl.au.entity.BussinessAccusation;

public interface BussinessAccusationRepository extends JpaRepository<BussinessAccusation, String> {

	@Query("select b from BussinessAccusation b where b.businesssellerBaseInfo.shopName like %?1% "
			+ "or b.businesssellerBaseInfo.shopAdress like %?1% "
			+ "or b.businesssellerBaseInfo.managementRange like %?1% or b.businesssellerBaseInfo.id like %?1%")
	Page<BussinessAccusation> getName(String key, Pageable pageable);

}
